package lab02.test32;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

public class Test32 {
    public static void main(String[] args) {
        //Map
        //key  value
        //1001 张三

        Map<Long, String> map = new HashMap<Long, String>();
        map.put(1001L, "张三");
        map.put(1002L, "李四");
        map.put(1003L, "王五");

        //遍历map
        for (Map.Entry<Long, String> entry : map.entrySet()) {
            System.out.println(entry.getKey() + ":" + entry.getValue());

            //set
            Set<Integer> set = new HashSet<Integer>();
            set.add(10);
            set.add(29);
            set.add(30);

            for (Integer n : set) {
                System.out.println(n);
            }
        }
    }
}
